#ifndef GPIOTIMER_H
#define GPIOTIMER_H
#include "gpio.h"

// support control how many gpio at same time, change to suit your demand
#define MAXTIMER_NUM 5

/*
 * describe: using timer & signal, call this will let gpio hold value for msec
 * million seconds, after that, gpio change to !value.
 * add a already added gpio will overrite the former one
 *
 * gpio: which gpio you want change
 * value: what value you want to write after msec
 * msec: how many million seconds
 *
 * return: 0 on success, -1 on error( not enough timer left )
 */
int gpiotimer_hold(struct GPIO* gpio, int value, int msec);

#endif // GPIOTIMER_H
